package com.lft.examsys.entity;

import com.baomidou.mybatisplus.annotation.TableField;

import java.util.Date;

/**
 * @author ：Qingchen
 * @date ：Created in 2022/3/28 12:19
 * @description：试卷
 * @modified By：
 * @version: $
 */
public class Paper {

    private Integer id;
    private String title;
    private Date begin;
    @TableField(exist = false)
    private Date end;
    private Integer limitation;
    @TableField(exist = false)
    private Integer score;

    public String getColor() {
        if (score < 60) {
            return "danger";
        } else if (score < 80) {
            return "warning";
        }
        return "success";
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Date getBegin() {
        return begin;
    }

    public void setBegin(Date begin) {
        this.begin = begin;
    }

    public Date getEnd() {
        return end;
    }

    public void setEnd(Date end) {
        this.end = end;
    }

    public Integer getLimitation() {
        return limitation;
    }

    public void setLimitation(Integer limitation) {
        this.limitation = limitation;
    }
}
